/**
 * Copyright (c) 2018, Alex. All rights reserved.
 */
package com.oschina.bottle.poi;

import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 文件对象类，保存文件的一下关键信息
 *
 * transient修饰的关键字，在Serializable中不会被序列化
 *
 * @author <a href="mailto:zhongchao@gegejia.com">zhong</a>
 * @version 1.0 2018/1/22
 * @since 1.0
 */
public class FileInfo {

    /**
     * 文件名称
     */
    private String name;

    /**
     * 表头标题所在的行
     */
    private int headerIndex = 0;

    /**
     * sheet页码
     */
    private int sheetIndex;

    /**
     * sheet名称
     */
    private String sheetName = "sheet1";

    /**
     * 数据
     */
    private List<Map<String, Object>> data;

    /**
     * 输入流
     */
    private transient OutputStream output;

    /**
     * 输出流
     */
    private transient InputStream input;

    /**
     * 表头标题属性
     */
    private transient List<Head> heads;

    /**
     * 是否显示表头
     */
    private boolean showHeader = true;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHeaderIndex() {
        return headerIndex;
    }

    public void setHeaderIndex(int headerIndex) {
        this.headerIndex = headerIndex;
    }

    public int getSheetIndex() {
        return sheetIndex;
    }

    public void setSheetIndex(int sheetIndex) {
        this.sheetIndex = sheetIndex;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }

    public List<Map<String, Object>> getData() {
        return data;
    }

    public void setData(List<Map<String, Object>> data) {
        this.data = data;
    }

    public OutputStream getOutput() {
        return output;
    }

    public void setOutput(OutputStream output) {
        this.output = output;
    }

    public InputStream getInput() {
        return input;
    }

    public void setInput(InputStream input) {
        this.input = input;
    }

    public void setHeads(List<Head> heads) {
        this.heads = heads;
    }

    public List<Head> getHeads() {
        return heads;
    }

    public boolean isShowHeader() {
        return showHeader;
    }

    public void setShowHeader(boolean showHeader) {
        this.showHeader = showHeader;
    }
}
